﻿Public Class RsimuladorCta

    'Public Shared Function SeleccionarTodo(ByVal descEmpresa As String, ByVal DisplaySelect As Boolean, ByVal pSimuladorCta As EsimuladorCta) As List(Of EsimuladorCta)
    '    Dim simuladorCtas As List(Of EsimuladorCta) = Nothing

    '    Dim options As New TransactionOptions
    '    options.IsolationLevel = Transactions.IsolationLevel.ReadCommitted
    '    options.Timeout = New TimeSpan(0, 2, 0)

    '    Using scope As New TransactionScope(TransactionScopeOption.Required, options)
    '        Try
    '            simuladorCtas = DsimuladorCta.SeleccionarTodo(descEmpresa, pSimuladorCta)
    '            scope.Complete()
    '        Catch ex As Exception
    '            Throw
    '        End Try
    '    End Using

    '    Return simuladorCtas
    'End Function
    Public Shared Function Añadir(ByVal descEmpresa As String, ByVal pSimuladorCta As EsimuladorCta) As Boolean
        Dim resultado As Boolean = False

        Dim options As New TransactionOptions
        options.IsolationLevel = Transactions.IsolationLevel.ReadCommitted
        options.Timeout = New TimeSpan(0, 2, 0)

        Using scope As New TransactionScope(TransactionScopeOption.Required, options)
            Try
                resultado = DsimuladorCta.Añadir(descEmpresa, pSimuladorCta)
                scope.Complete()
            Catch ex As Exception
                Throw
            End Try
        End Using

        Return resultado
    End Function
    Public Shared Function AñadirVersus(ByVal descEmpresa As String, ByVal pSimuladorCta As EsimuladorCta) As Boolean
        Dim resultado As Boolean = False

        Dim options As New TransactionOptions
        options.IsolationLevel = Transactions.IsolationLevel.ReadCommitted
        options.Timeout = New TimeSpan(0, 2, 0)

        Using scope As New TransactionScope(TransactionScopeOption.Required, options)
            Try
                resultado = DsimuladorCta.AñadirVersus(descEmpresa, pSimuladorCta)
                scope.Complete()
            Catch ex As Exception
                Throw
            End Try
        End Using

        Return resultado
    End Function
    'Public Shared Function Eliminar(ByVal descEmpresa As String, ByVal pSimuladorCta As EsimuladorCta) As Boolean
    '    Dim resultado As Boolean = False

    '    Dim options As New TransactionOptions
    '    options.IsolationLevel = Transactions.IsolationLevel.ReadCommitted
    '    options.Timeout = New TimeSpan(0, 2, 0)

    '    Using scope As New TransactionScope(TransactionScopeOption.Required, options)
    '        Try
    '            resultado = DsimuladorCta.Eliminar(descEmpresa, pSimuladorCta)
    '            scope.Complete()
    '        Catch ex As Exception
    '            Throw
    '        End Try
    '    End Using

    '    Return resultado
    'End Function

End Class
